from base.util.api_util import ApiUtil
from global_ver import currentConfigDao, configDao


def get_current_config_():
    current = currentConfigDao.get_current_config()
    if current is None:
        return ApiUtil.wrap_error("No current config", 400)
    config = configDao.get_config_by_id(id=current.config_id)
    if config is None:
        return ApiUtil.wrap_error("No config", 400)
    return config

